package Operation;
/**
 * 退出图书系统
 */

import Book.BookList;

public class ExitBook implements IOperation{
    @Override
    public void work(BookList bookList) {
        System.out.println("退出系统....");
        int count = bookList.getUsedSize();
        if(bookList.getBooks() != null){
            for (int i = count - 1; i >= 0; i--) {
                bookList.setBooks(i, null);
            }
        }
        System.exit(0);
    }
}
